A learning control function, though not commercially realized in robots, has come to find practical application in machine tools (see, for example, Patent Documents 1 and 2).
The learning control will be briefly explained. Learning control is defined as control of the optimization of the feedforward signal for the same operation. By repeating the same operation, the feedforward signal is updated, and results in a certain value (Variation by updating is relatively small.). Then, after the learning is finished, the feedforward signal obtained by learning control is used as it is without being updated. In a specific update process, a given operation of a robot mechanism unit is performed first by executing a task program for operating the robot mechanism unit using a given operating parameter, and during this operation, positional deviation data (for example, the vibration amount and the trajectory error amount) are measured by sensors, etc. Upon completion of this operation, the correction amount (learning correction amount) for the next operation parameter is calculated from the data. The next operation is performed while using the learning operation thus calculated while at the same time measuring the vibration amount and the trajectory error amount. Upon completion of this operation, the learning correction amount for the second next operation parameter is calculated from the learning correction amount and the measurement data obtained in the preceding operation. This process is repeated until the learning correction amount becomes a certain value and positional deviation decrease below a certain value, and the learning control is performed. After completion of the learning control, the operation (actual operation) is performed using the derived learning correction amount finally without measuring the vibration amount and the trajectory error amount. Also, after completion of the operation, the learning correction amount is not updated, and the same learning correction amount is used for the next operation. In the description of the invention that follows, operation for obtaining data regarding positional deviation of a robot mechanism unit and calculating a learning correction amount for decreasing positional deviation of the robot mechanism unit below a certain value is referred to as “the learning control”, operation for operating a robot mechanism unit in order to obtain the above data is referred to as “the learning operation”, and operation of a robot mechanism unit based on a learning correction amount calculated by a learning control unit is referred to as “the actual operation”.
A schematic diagram of a conventional robot (a learning controlled robot) with a learning controller function is shown in FIG. 1. A robot 100 is configured of a robot mechanism unit 1, and a control unit 2 for controlling the robot mechanism unit 1. The control unit 2 includes a learning control unit 3 for carrying out the learning control of the robot and a normal control unit 4 for driving the robot mechanism unit 1 directly.
The robot mechanism unit 1 has an arm 11, an arm forward end portion 12, a stereo sensor 13 and a motor (not shown). The motor of the robot mechanism unit 1 is supplied with a signal from the normal control unit 4 included in the control unit 2. The motor of the robot mechanism unit 1 drives the arm 11, and by moving the forward arm end portion 12 to the desired position, carries out the task such as welding. The stereo sensor 13 is installed on the forward arm end portion 12 and can obtain the spatial position data (yj(k)) of the arm forward end portion 12. The position data (yj(k)) from the stereo sensor 13 is output to the learning control unit 3 and used for learning control. In the position data (yj(k)), j designates the number of times trials that are made, and k the time.
The normal control unit 4 includes a position control unit 41, a speed control unit 42, a current control unit 43, an amplifier 44 and a differentiation means 45. The position control unit 41 receives the position command data (jd(k)) input externally of the control unit 2. The position control unit 41 further receives the data on the motor position of the robot mechanism unit 1 and outputs the desired position data of the forward arm end portion 12 of the robot mechanism unit 1 to the speed control unit 42. The differentiation means 45 receives the motor position data fed back from the robot mechanism unit 1, and by calculating the motor speed, outputs the resulting motor speed to the speed control unit 42.
The speed control unit 42 calculates the desired motor speed taking the position data from the position control unit 41 and the motor speed data from the differentiation means 45 into consideration, and outputs the calculation result to the current control unit 43. The current control unit 43, while receiving the current value fed back from the amplifier 44, calculates the current supplied to the motor in such a manner as to achieve the desired motor speed input from the speed control unit 42, and outputs the calculated current to the amplifier 44. The amplifier 44 calculates the desired power based on the current value from the current control unit 43, and charges the desired power in the motor (not shown) of the robot mechanism unit 1.
The learning control unit 3 includes a first memory 31, a learning controller 32, a second memory 33 and a RAM 34. The first memory 31 is supplied with and stores a target correction amount ej(k) through a filter 30 based on the position command data (yd(k)) for the arm forward end portion 12 and the position data (yj(k)) measured by the stereo sensor 13. At the same time, the target correction amount ej(k) is output to the learning controller 32. Incidentally, the target correction amount ej(k) corresponds to an error from the desired position of the arm forward end portion 12.
The learning controller 32 executes a learning control for calculating a learning correction amount in order to decrease a positional deviation of the robot mechanism unit by carrying out the task program stored in the RAM 34 built in the learning controller 32. The learning controller 32, by carrying out the task program, calculates the learning correction amount uj+1(k) from the learning correction amount uj(k) for the preceding trial and the target correction amount ej(k) stored in the RAM 34, and outputs the learning correction amount uj+1(k) to the second memory 33 and the RAM 34. The learning correction amount uj+1(k) input to the second memory 33 is stored in the second memory 33 while at the same time being added to the positional deviation data calculated by the position control unit 41 of the normal control unit 4.
Based on the positional deviation data thus corrected, the robot mechanism unit 1 is controlled and the learning control is repeated. In the learning control, this series of processes is repeatedly executed and the positional deviation is converged to a certain value, preferably “0”. After the end of the learning control, i.e., during the actual operation, the learning correction amount updating loop indicated by the dotted line in FIG. 1 is not carried out, and the learning correction amount uj+1(k) is output to the position control unit 41 from the second memory 33. Incidentally, in FIG. 1, the solid lines indicate the process executed when the normal control unit 4 activates the robot mechanism unit 1 during a learning operation or an actual operation, and process for calculating a learning correction amount in the learning control indicated by the dotted lines is executed after the learning operation.    Patent Document 1: JP-A-2009-83074    Patent Document 2: JP-A-2006-172149
The conventional learning control technique has the problem of being narrow and not sufficiently taken into consideration in actual use. Specifically, the learning control assumes that the same operation is repeated. In the case where the operation not assumed by the learning control is performed in the learning operation or the actual operation (for example, the provisional stop, or the change in speed override, hereinafter referred to as the “exception” or “exception process”), therefore, the learning correction amount may deteriorate the operation. In particular, in the case where the operation speed is high, the robot mechanism unit may develop vibration.
The object of this invention is to provide a protective (anti-exception) means and a relearning method in the case where an exception process occurs when executing the learning operation or the actual operation of a robot with a learning control function.